package com.example.check_in.feign;


import com.example.core.config.FeignConfig;
import com.example.model.response.Result;
import com.example.model.room.Room;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-room", configuration = FeignConfig.class)
public interface RoomFeignClient {

    @GetMapping("room/getByNo/{roomNo}")
    Result get(@PathVariable("roomNo") String roomNo);

    @GetMapping("/room/{id}")
    public Result get(@PathVariable("id") Long id);

    @PutMapping("/room")
    Result update(@Valid @RequestBody Room room);


}
